home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / prgtools / mint / mntdoc01.zoo / mintdoc / cat2 / dopendir.nr < prev    next >
Encoding:
Text File  |  1993-03-03  |  2.3 KB  |  67 lines

  1.  
  2.  
  3.  
  4. Dopendir(2)                Oct. 1, 1991               Dopendir(2)
  5.  
  6.  
  7. N✓NA✓AM✓ME✓E
  8.        Dopendir - open a directory for reading
  9.  
  10. S✓SY✓YN✓NO✓OP✓PS✓SI✓IS✓S
  11.        LONG Dopendir( char *name, WORD flag );
  12.  
  13. D✓DE✓ES✓SC✓CR✓RI✓IP✓PT✓TI✓IO✓ON✓N
  14.        _✓D_✓o_✓p_✓e_✓n_✓d_✓i_✓r  opens  the directory whose name is pointed to by
  15.        _✓n_✓a_✓m_✓e for reading. A 32 bit directory  handle  is  returned
  16.        which  may  be  passed  to  _✓D_✓r_✓e_✓a_✓d_✓d_✓i_✓r  to actually read the
  17.        directory.  _✓f_✓l_✓a_✓g controls the way directory operations are
  18.        performed.  If  flag  ==  1, then the directory is read in
  19.        "compatibility" mode, if flag == 0 then  directory  opera-
  20.        tions  are  performed in "normal" mode. In "compatibility"
  21.        mode, file systems act as if the _✓F_✓s_✓f_✓i_✓r_✓s_✓t and _✓F_✓s_✓n_✓e_✓x_✓t  func-
  22.        tions  were  being  used; in particular, if it is possible
  23.        file names will be restricted to the DOS 8 character  name
  24.        +  3  character extension convention, and will be in upper
  25.        case.  In "normal" mode, file systems do  not  attempt  to
  26.        restrict  the  range  of names. Moreover, in this mode the
  27.        _✓D_✓r_✓e_✓a_✓d_✓d_✓i_✓r system call will also return a file index  number
  28.        (similar  to  the  Unix  inode number) along with the file
  29.        name.
  30.  
  31.        New programs should generally use normal mode where possi-
  32.        ble.
  33.  
  34. R✓RE✓ET✓TU✓UR✓RN✓NS✓S
  35.        A  32  bit  directory  handle, on success.  Note that this
  36.        handle may be negative, but will never contain the pattern
  37.        0xFF in the upper byte, whereas all errors do contain this
  38.        pattern in the upper byte.
  39.  
  40.        EPTHNF if _✓n_✓a_✓m_✓e is not a valid directory
  41.  
  42.        EACCDN if the directory is not accessible by this program
  43.  
  44.        ENSMEM if the kernel is unable to allocate  memory  needed
  45.        for the directory operations
  46.  
  47. S✓SE✓EE✓E A✓AL✓LS✓SO✓O
  48.        _✓D_✓c_✓l_✓o_✓s_✓e_✓d_✓i_✓r(2), _✓D_✓r_✓e_✓a_✓d_✓d_✓i_✓r(2), _✓D_✓r_✓e_✓w_✓i_✓n_✓d_✓d_✓i_✓r(2)
  49.  
  50. B✓BU✓UG✓GS✓S
  51.        Failure  to call Dclosedir() when the search is done could
  52.        result in  the  system  eventually  running  out  of  file
  53.        indices;  this  is fatal.  So always call Dclosedir() when
  54.        you're finished with the directory search!
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64. Version 0.9          MiNT Programmer's Manual                   1
  65.  
  66.  
  67.